import unittest
from threeRepFunction import threeRepFunction

class TestThreeReps(unittest.TestCase):

    def setUp(self):
        self.threeRepInstance = threeRepFunction()
 
    def test_threeReps1(self):
        self.threeRepInstance.chessBoard._state_stack_pointer = 21
        self.threeRepInstance.chessBoard._three_rep_stack = [1,2,3,4,5,6,7,1,2]
        check = self.threeRepInstance.threeRepetitions()
        #print check
        self.assertEqual(check, False)

    def test_threeReps2(self):
        self.threeRepInstance.chessBoard._state_stack_pointer = 21
        self.threeRepInstance.chessBoard._three_rep_stack = [1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7]
        check = self.threeRepInstance.threeRepetitions()
        #print check
        self.assertEqual(check, True)

if __name__ == '__main__':
    unittest.main()